package cn.stylefeng.guns.modular.api.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@SuppressWarnings("rawtypes")
@ApiModel
public class LeftMenuDTO implements Comparable{

	public LeftMenuDTO(String name, String desc, String value,  String pageType, Integer pri) {
		this.name = name;
		this.desc = desc;
		this.value = value;
		this.pageType = pageType;
		this.pri = pri;
	}
	
	@ApiModelProperty("栏目名称")
	private String name;
	@ApiModelProperty("简介-栏目名称底部简介")
	private String desc;
	@ApiModelProperty("跳转地址所需的值")
	private String value;
	@ApiModelProperty("栏目跳转类型 list=列表页，datails=详情页")
	private String pageType;
	@ApiModelProperty("排序号")
	private Integer pri;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getPageType() {
		return pageType;
	}

	public void setPageType(String pageType) {
		this.pageType = pageType;
	}

	public Integer getPri() {
		return pri;
	}

	public void setPri(Integer pri) {
		this.pri = pri;
	}

	@Override
	public int compareTo(Object o) {
		if(o instanceof LeftMenuDTO){
			LeftMenuDTO emp = (LeftMenuDTO) o;
			return this.pri.compareTo(emp.pri);
        }
		return 0;
	}
	
}
